home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / fftplot.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  49 lines

  1. (User.programs) 
  2. Item: 274 by _fbaird at hpcvbbs.UUCP 
  3. Author: [Frank Gregory Baird] 
  4.   Subj: FFT plotting 
  5.   Date: Fri May 03 1991 
  6.  
  7. This is an FFT program taken from Oppenheim and Schafer's Digital Signal 
  8. Processing. The first argument is a complex 2^n-element vector. The 
  9. second argument is 1 for a forward FFT, and -1 for a backward (inverse) 
  10. FFT. Also included is a neat little program PLFFT which plots the 
  11. magnitudes the results of the FFT program. If the plot doesn't look 
  12. right, you may need to execute a RESET first. If this doesn't fix all the 
  13. problems, you may wish to also execute 'X' INDEP first. Alternatively you 
  14. may add this code 
  15.  { (-6.5,-3.1) (6.5,3.2) X 0 (0,0) BAR Y } 'PPAR' STO 
  16.  # 83h # 40h PDIM 
  17. before 
  18.  1 XCOL BARPLOT GRAPH. 
  19.   
  20. Example: 
  21. Enter the 16-element vector (16x1 matrix) then a 1 for a forward FFT 
  22. [ (1,0) (1,0) (1,0) (1,0) 
  23.   (0,0) (0,0) (0,0) (0,0) 
  24.   (0,0) (0,0) (0,0) (0,0) 
  25.   (0,0) (0,0) (0,0) (0,0) ] 
  26. The returned result is also a 16-element vector 
  27. [ (4,0)  
  28.   (3.01366974607,-2.01366974607) 
  29.   (.999999999998,-2.41421356237) 
  30.   (-.248302881332,-1.24830288133) 
  31.   (0,0) 
  32.   (.834089318959,.165910681042) 
  33.   (1,-.41421356237) 
  34.   (.40054381631,-.599456183685) 
  35.   (0,0) 
  36.   (.40054381631,.599456183693) 
  37.   (1,.41421356237) 
  38.   (.834089318956,-.165910681041) 
  39.   (0,0) 
  40.   (-.248302881331,1.24830288133) 
  41.   (.999999999999,2.41421356237) 
  42.   (3.01366974607,2.01366974606) ] 
  43.  
  44. Author: 
  45. Frank G. Baird 
  46. HP BBS: fbaird 
  47. Internet:UG0342@applelink.apple.com.  
  48.